package com.phrp.controller;

import com.phrp.common.ConstantEnum;
import com.phrp.service.NoticeService;
import com.phrp.util.returnResult.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ssc
 * @since 2024-05-05
 */
@RestController
@RequestMapping("/api/notice")
public class NoticeController {

    @Autowired
    private NoticeService noticeService;

    /**
     * 获取首页公告数据
     * @return
     */
    @GetMapping(value = "getNoticeData")
    public ResponseResult getNoticeData(){
        return noticeService.getNoticeData(ConstantEnum.HOME_NOTICE.getCode());
    }

}
